import cv2, mediapipe as mp
mp_face_mesh = mp.solutions.face_mesh
mp_draw      = mp.solutions.drawing_utils

cap = cv2.VideoCapture("rtsp://admin:juhui2025@192.168.50.25:554/Streaming/Channels/102")
with mp_face_mesh.FaceMesh(max_num_faces=1,
                           refine_landmarks=True,
                           min_detection_confidence=0.5) as mesh:
    while cap.isOpened():
        ret, frame = cap.read()
        image = cv2.cvtColor(cv2.flip(frame, 1), cv2.COLOR_BGR2RGB)
        results = mesh.process(image)
        print(results.multi_face_landmarks)
        if results.multi_face_landmarks:
            for face in results.multi_face_landmarks:
                mp_draw.draw_landmarks(frame, face,
                                       mp_face_mesh.FACEMESH_CONTOURS)
        cv2.imshow('Face Mesh', frame)
        if cv2.waitKey(1) & 0xFF == 27: break
cap.release(); cv2.destroyAllWindows()